import {request} from "@/utils/reuqest";
import type {LoginParams, Profile} from "@/types/user";

/**
 * 1. 登录
 */
export const loginApi = (data: LoginParams)=>{
    return request<{token: string}>('/park/login', 'POST', data)
}
/**
 * @description: 获取用户信息
 * @param {*} data {}
 * @return {*} promise
 */
export const getProfileAPI = () => {
    return request<Profile>('/park/user/profile')
}